<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>出院护理评估</title>
	<#include "/common/resource.ftl">
</head>
<body>

<div class="ui-operation">
    <div class="ui-search-items layui-form">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline">
                    <input type="text" name="elderName" class="layui-input">
                </div>
            </div>
        </div>
    </div>
    <div class="ui-buttons">
        <div class="layui-btn-group tools">
            <button class="layui-btn layui-btn-normal singleSelected" p="url:'${params.contextPath}/view/business/outHospital/nurse_approval',title:'护理评估通过',width:'90%',height:'100%'"><i class="fa fa-check"></i>护理评估通过</button>
            <button class="layui-btn layui-btn-normal singleSelected" p="url:'${params.contextPath}/view/business/outHospital/nurse_reject',title:'护理评估拒绝',width:'90%',height:'100%'"><i class="fa fa-home"></i>护理评估拒绝</button>
        </div>
        <div class="ui-searchs">
            <input type="button" value="搜索" class="layui-btn layui-btn-danger search-button"/>
        </div>
    </div>
</div>
<div class="ui-content" style="padding-left: 10px;padding-right:10px;">
    <table id="datagrid" options="url:'${params.contextPath}/web/outHospital/list',params:'getSearchParams',dblClickRow:'showDetail'">
        <thead>
			<tr>
                <th data-options="field:'id',checkbox:true"></th>
                <th data-options="field:'elderName',align:'left'">姓名</th>
                <th data-options="field:'sex',align:'left',formatter:formatSex">性别</th>
                <th data-options="field:'birthDate',align:'left'">出生年月</th>
                <th data-options="field:'idcard',align:'left'">身份证号</th>
                <th data-options="field:'code',align:'left'">入院号</th>
                <th data-options="field:'bedNum',align:'left'">床位号</th>
                <th data-options="field:'checkInDateStr',align:'left'">入住日期</th>
                <th data-options="field:'nursingLevelStr',align:'left'">护理等级</th>
                <th data-options="field:'leaveDateStr',align:'left'">离院日期</th>
                <th data-options="field:'reason',width:150,align:'left'">离院原因</th>
                <th data-options="field:'statusStr',align:'left'">状态</th>
                <th data-options="field:'remark',width:150,align:'left'">备注</th>
			</tr>
        </thead>
    </table>
</div>
<script type="text/javascript">
    function getSearchParams() {
        return {
            elderName: $("input[name='elderName']").val(),
            status: 2
        };
    }
    var showDetail = function (index, row) {
        <@auth code='elder_detail'>
            var url = "${params.contextPath}/view/business/outHospital/outHospital_detail?id=" + row.id;
            DialogManager.openDialog("url:'" + url + "',title:'老人出院登记表详情',width:'90%',height:'100%'");
        </@auth>
    };
    //formatter:formatState
	var sexOperator = "";
	function formatSex(row) {
		if (!sexOperator) {
			sexOperator = DictionaryHelper.getDictionaryOperator("sex");
		}
		return sexOperator.getDictionaryItemName(row.sex);
	}

</script>
</body>

</html>
